PASSWORD=$(zenity - --password --title "密码默认1234")
echo $PASSWORD | sudo -S ls &> /dev/null
sudo pacman -S git --noconfirm
sudo -S rm -rf /esp/efi/clover
sudo rm -rf /home/deck/1Clover-tools/
sudo rm -rf /home/deck/Desktop/Clover-Toolbox
sudo rm -rf /home/deck/Desktop/双系统引导配置工具
cd /run/media/deck/Game/
git clone https://gitee.com/leeshan520/CloverBootloader/
cd /run/media/deck/Game/CloverBootloader/SteamDeck-Clover-dualboot-main/
chmod +x install-clover.sh
./install-clover.sh
rm -rf /run/media/deck/Game/CloverBootloader/
sudo rm /tmp/steamdeck.sh

zenity --question --width=400 \
  --text="修复成功！需要重启才能生效！, \
\n现在是否重启?"
if [ "$?" != 0 ]; then
  #NOTE: This code will never be reached due to "set -e", the system will already exit for us but just incase keep this
  echo "bye then! xxx"
  exit 0;
fi

reboot
